/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lesson3.com.demo.inner.member;

import lesson3.com.demo.inner.not.*;

// called a "top-level" class, can be public or p-f ONLY
public class Car {
    
    private float fuelLevel;
    private Engine eng = new CarEngine();
    
    // member inner class, may be public, protected, p-f, or private
    public class CarEngine implements Engine{

        @Override
        public void rev() {
            fuelLevel-=0.05F;
        }
        
    }
    
    public void run(){
        // affect fuelLevel;
        fuelLevel-=0.02F;
    }
    
    public void addGas(float amount, double moneyMoneyMoney){
        // check money... THEN
        fuelLevel+=amount;
    }
    
    public float siphonTankForLawnMower(float  amount){
        fuelLevel-=amount;
        return fuelLevel;
    }
    
    public float getFuelLevel(){
        return fuelLevel;
    }
    
    protected interface MemberInnerInterface {}
    
    enum PackageFriendlyInnerEnum {A,B,C;}
    

}
